<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
<title>登录-{$web_config['web_title']}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">
<link href="/assets/css/frontend.min.css?v=1.0.1" rel="stylesheet">
<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
        <link href="/assets/css/user.css?v=1.0.1" rel="stylesheet">
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
				<script src="http://zhitu.tuyingteam.com/static/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://zhitu.tuyingteam.com/static/js/kefu.js"></script>

<style>
	.footer_kf { height:100px; width:100%; position:fixed; bottom:0; left:0; z-index:8888;}
	.fd_box { height:117px; position:fixed; width:100%; bottom:0; left:0; z-index:666;}
	.fd_box01 { width:100%; height:70px; position:fixed; bottom:0; background:url(http://zhitu.tuyingteam.com/static/images/db_img09.png);}
	.fd_box02 { margin:0 auto; width:1000px; height:117px; position:relative; bottom:0; z-index:888;}
	.fd_gb { width:20px; height:20px; margin:10px 0 0 0; position:absolute; right:0; top:0;}
	.fd_tu { width:936px; height:145px; position:absolute; bottom:18px; left:0;}
	.fd_left { display:block; width:141px; height:120px; position:fixed; left:0; bottom:25%; background:url(http://zhitu.tuyingteam.com/static/images/db_img08.png) no-repeat left top;}
	.yqlj_box a { display:block; float:left; padding:0 10px; height:26px; line-height:26px; color:#666; margin:0 10px 5px 5px}
	.yqlj_box a:hover { color:#f31c1c;}
</style>
    </head>

    <body>
        {include file="header"}
        <main class="content">
            <div id="content-container" class="container">
    <div class="user-section login-section">
        <div class="logon-tab clearfix">
			<a class="active">登 录</a>
			<a href="{:url("index/reg")}">注 册</a>
		</div>
        <div class="login-main"> 
            <form name="form" id="login-form" class="form-vertical" method="POST" action="">
				<div class="form-group">
                    <label class="control-label" for="account">账号</label>
                    <div class="controls">
                        <input class="form-control input-lg" id="phone" type="text" name="phone" value="18888888888" data-rule="required" placeholder="手机号" autocomplete="off">
                        <div class="help-block"></div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="control-label" for="password">密码</label>
                    <div class="controls">
                        <input class="form-control input-lg" id="password" type="password" value="123456" name="password" data-rule="required;password" placeholder="密码" autocomplete="off">
                    </div>
                </div>
                <!--<div class="form-group">
                    <div class="controls">
                        <input type="checkbox" name="keeplogin" checked="checked" value="1"> 保持会话 
                        <div class="pull-right"><a href="javascript:;" class="btn-forgot">忘记密码?</a></div>
                    </div>
                </div>-->
                <div class="form-group">
                    <div type="submit" class="btn btn-primary btn-lg btn-block sub">登 录</div>
                </div>
            </form>
        </div>
    </div>
</div>
        </main>
        {include file="footer_content"}
<script>
$(".sub").click(function(){
	var phone       = $("#phone").val();
	var password    = $("#password").val();
	
	
	if(phone == ""){
		alert("用户手机号不能为空");
		return false
	}

	if(phone.length < 11 || phone.length > 11){
		alert("用户手机号格式错误，请重新输入！");
		return false
	}
	
	if(password == ""){
		alert("密码不能为空");
		return false
	}
	

	$.ajax({
		type:"POST",
		url:"{:url('index/login')}",
		dataType:"json",
		data:{
			phone:phone,
			password:password,
		},
		success:function(res){
			if(res.status == "success"){
				window.location.href = "{:url('user/index')}";
				//alert(res.data);
			}else{
				alert(res.data);
			}
		},
		error:function(jqXHR){
			console.log("Error: "+jqXHR.status);
		},
	});
	
});
</script>
    </body>
</html>